//
//  CWViewStaticTouchEventAnaylzer.h
//  CWDevelop
//
//  Created by LittoCats on 7/15/14.
//  Copyright (c) 2014 Littocats. All rights reserved.
//

#import <Foundation/Foundation.h>

@class CWBarButtonItem;
@class CWJavaScriptFunction;

@interface CWViewStaticTouchEventAnalyzer : NSObject

+ (instancetype)defaultAnalyzer;


/**
 *  events: {
    "onClick":CWScriptFunction
    "onDoubleClick":CWScriptFunction
 }
 *  CWScriptFunction 结构为 ：  {
                                    "__function":function
                                    "__context":context
                                }

 */
+ (void)anaylzeTouchEvents:(NSArray *)events ofView:(UIView *)view;

/**
 *  CWView
 */
- (void)addTouchResponder:(NSDictionary *)responder toView:(UIView *)view ofType:(NSString *)type;

/**
 *  CWBarButtonItem
 */
- (void)addTouchResponder:(NSDictionary *)responder toBarButtonItem:(CWBarButtonItem *)item;
- (void)buttonItemClicked:(CWBarButtonItem *)item;
@end
